<template>
	<view>
		<child-test class="child" @btn="getChild" :bgColor="'#654645'" :msg="msg"></child-test>
		<input type="text" class="input" focus @input="change" v-model="msg"/>
	</view>
</template>

<script>
	import childTest from '../../components/child-test/child-test';
	export default {
		components:{childTest},
		data() {
			return {
				msg:'我是父组件得值',
			}
		},
		methods: {
			getChild(e){
				console.log(e)
			},
			change(e){
				console.log(e.target.value)
				this.msg=e.target.value
			}
		}
	}
</script>

<style lang="scss">
.child{
	margin-top: 90rpx;
}
.input{
	margin: 30px;
	height: 80rpx;
	border: 1px solid #43c3bf;
	border-radius: 20rpx;
}
</style>
